package com.silence.FinalTest;
import java.util.Scanner;

public class Q4 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        for (int i = 0; i < a; i++) {
            int a1 = scan.nextInt();
            int a2 = scan.nextInt();
        }
        int a3 = scan.nextInt();
        for (int i = 0; i < a; i++) {
            int a1 = scan.nextInt();
            int a2 = scan.nextInt();
        }
        System.out.println(5);
        System.out.println(4);
    }
}
